﻿using System.Collections.Generic;
using System.Threading.Tasks;
using BCEntity.OA.Attendance.AttendanceLocation;

namespace BCData.OA.Attendance.AttendanceLocation
{
    public interface IAttendanceLocationData
    {
        /// <summary>
        /// 获取打卡地址信息
        /// </summary>
        /// <param name="locationId">地址Id</param>
        /// <returns></returns>
        Task<AttendanceLocationEntity> GetEntityAsync(long locationId);

        /// <summary>
        /// 获取考勤打卡地址信息列表
        /// </summary>
        /// <returns></returns>
        Task<IEnumerable<AttendanceLocationEntity>> GetAsync();

        /// <summary>
        /// 新创建一个考勤打卡地址信息
        /// </summary>
        /// <param name="entity">打卡地址</param>
        /// <returns></returns>
        Task<AttendanceLocationEntity> InsertAsync(AttendanceLocationEntity entity);

        /// <summary>
        /// 校验考勤地址信息存在不
        /// </summary>
        /// <param name="locationId">地址Id</param>
        /// <returns></returns>
        Task<bool> CheckIsExist(long locationId);

        /// <summary>
        /// 删除打卡地址
        /// </summary>
        /// <param name="locationId">地址Id</param>
        /// <param name="adminName">管理员信息</param>
        /// <returns></returns>
        Task<int> DeleteAsync(long locationId, string adminName = null);

        /// <summary>
        /// 修改打卡地址信息
        /// </summary>
        /// <param name="entity">打卡地址</param>
        /// <returns></returns>
        Task<AttendanceLocationEntity> UpdateAsync(AttendanceLocationEntity entity);

        /// <summary>
        /// 获取考勤打卡地址信息列表
        /// </summary>
        /// <returns></returns>
        Task<IEnumerable<AttendanceLocationEntity>> GetListByModeIdAndGroupIdAsync(long groupId);
    }
}
